/* 
 * File:   Image.h
 * Author: artem
 *
 * Created on November 18, 2011, 11:08 PM
 */

#ifndef IMAGE_H
#define IMAGE_H

#include "Common.h"

namespace Resource
{
	struct Image
	{
		uint8_t  *data;
		uint32_t  width;
		uint32_t  height;
		uint32_t  bpp;
		
		Image(): data(NULL), width(0), height(0), bpp(0) {}
		Image(uint32_t width, uint32_t height, uint32_t bpp):
			width(width), height(height), bpp(bpp)
		{
			data = new uint8_t[width * height * (bpp / 8)];
		}
		~Image() { delete[] data; }
	};
	
	Image* loadImage(const char *name);
}

#endif /* IMAGE_H */
